package com.itheima.多线程.练习;

public class Demo2 {
    public static void main(String[] args) {
        MyRrunnable mr1=new MyRrunnable();
        mr1.setName("线程1");
        MyRrunnable mr2=new MyRrunnable();
        mr1.setName("线程2");
        MyRrunnable mr3=new MyRrunnable();
        mr1.setName("线程3");
        mr1.start();
        mr2.start();
        mr3.start();

    }
}

class MyRrunnable extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(getName()+"..."+i);
        }
    }
}